#pragma once
#include <vector>
#include <map>
#include "afxwin.h"
#include "base/logcontent.h"
#include "resource.h"
#include "base/logdef.h"
class CTargetSelDlg : public CDialog
{
	DECLARE_DYNAMIC(CTargetSelDlg)

public:
	CTargetSelDlg(CWnd* pParent = NULL);
	virtual ~CTargetSelDlg();
	enum { IDD = IDD_CONNECT_PROCESS };

    HWND GetConnectTargetWnd() const
    {
        return m_hConnectTargetWnd;
    }

    Base::Log::Type GetLogType() const
    {
        return m_logLevelType;
    }

    const CString& GetConnectProcessDesc() const
    {
        return m_strConnectProcess;
    }

protected:
	virtual void DoDataExchange(CDataExchange* pDX);
    virtual BOOL OnInitDialog();
    afx_msg void OnBnClickOk();
	DECLARE_MESSAGE_MAP()

    static BOOL CALLBACK EnumLogSupporterWnds(HWND hWnd, LPARAM lParam);    
private:
    CComboBox           m_logSupportProcessList;
    CComboBox           m_logLevel;
    HWND                m_hConnectTargetWnd;
    DWORD               m_dwConnectProcess;
    CString             m_strConnectProcess;
    std::vector<DWORD>  m_logSupportProcess;
    std::vector<HWND>   m_logSupportWnds;
    Base::Log::Type     m_logLevelType;
    std::map<DWORD, CString> m_processeNames;
};
